//
//  JKHorizonView.h
//  JackToolsBox
//
//  Created by Jack Xue on 2019/12/24.
//  Copyright © 2019 Jack Xue. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "JkHorizonItem.h"

NS_ASSUME_NONNULL_BEGIN
@class JKHorizonView;
@protocol JKHorizonViewDataSource <NSObject>
@required
-(JkHorizonItem*)horizonView:(JKHorizonView*)horizonView itemAtIndex:(NSInteger)index;
-(NSInteger)numberOfItemsInHorizonView:(JKHorizonView*)horizonView;
@end

@interface JKHorizonView : UIView

@property(weak, nonatomic)id<JKHorizonViewDataSource> dataSource;
///每个item的尺寸，默认与self.frame一样
@property(assign, nonatomic)CGSize itemSize;
///刷新
-(void)reloadData;
///重用item
-(JkHorizonItem*)dequeueReusableItem;
@end

NS_ASSUME_NONNULL_END
